18. Deploying Stemming

Deploying Stemming

Question:

In parseOutText() , comment out the following line:



words = text_string



Augment parseOutText() so that the string it returns has all the words stemmed using a SnowballStemmer (use the nltk package, some examples that I found helpful can be found here: http://www.nltk.org/howto/stem.html ). Rerun parse_out_email_text.py , which will use your updated parseOutText() function--what’s your output now?


Hint : you'll need to break the string down into individual words, stem each word, then recombine all the words into one string.

Start Quiz: